<template>
  <div class="l-echart-common"
       :style="styleSizeName"
       @click="handleClick">
    <div :ref="id"
         :style="styleChartName"></div>
  </div>
</template>

<script>
import init from "../mixins/common";
export default {
    mixins:[init],
    methods: {
        updateChart () {
            const optionData = this.$deepClone(this.dataChart) || [];
            const option = this.echartFormatter(optionData);
            this.myChart.resize();
            this.myChart.setOption(option, true);
        },
        handleClick() {
                this.clickFormatter && this.clickFormatter({
                    data: this.echartFormatter()
                }, this.getItemRefs());
            },
    }
}
</script>